1
//------------------------------------------------------------------------------
3 // This code was generated by a tool.
5 // Changes to this file may cause incorrect behavior and will be lost if
6 // the code is regenerated.
8 //------------------------------------------------------------------------------
9 using DslModeling
= global::Microsoft
.VisualStudio
.Modeling
;
10 using DslShell
= global::Microsoft
.VisualStudio
.Modeling
.Shell
;
12 namespace Fabrikam
.Dsl
.TestValidation
15 /// Double-derived class to allow easier code customization.
17 [global::System
.Runtime
.InteropServices
.Guid(Constants
.TestValidationModelExplorerToolWindowId
)]
18 internal partial class TestValidationExplorerToolWindow
: TestValidationExplorerToolWindowBase
21 /// Constructs a new TestValidationExplorerToolWindow.
23 public TestValidationExplorerToolWindow(global::System
.IServiceProvider serviceProvider
)
24 : base(serviceProvider
)
30 /// Model explorer tool window class.
32 internal abstract class TestValidationExplorerToolWindowBase
: DslShell
::ModelExplorerToolWindow
37 /// <param name="serviceProvider">Service provider.</param>
38 protected TestValidationExplorerToolWindowBase(global::System
.IServiceProvider serviceProvider
)
39 : base(serviceProvider
)
44 /// Specifies a resource string that appears on the tool window title bar.
46 public override string WindowTitle
50 global::System
.Resources
.ResourceManager resourceManager
= global::Fabrikam
.Dsl
.TestValidation
.TestValidationDomainModel
.SingletonResourceManager
;
51 return resourceManager
.GetString("ModelExplorerTitle");
56 /// Resource ID from VSPackage.resx containing the Model Explorer icon.
58 protected override int BitmapResource
67 /// Index of tool window icon in BitmapResource.
69 protected override int BitmapIndex
75 /// Creates the model explorer to be hosted in the window.
77 /// <returns>ModelExplorerTreeContainer</returns>
78 protected override DslShell
::ModelExplorerTreeContainer
CreateTreeContainer()
80 return new TestValidationExplorer(this);
84 /// Called when selection changes in this window.
87 /// Overriden to update the F1 help keyword for the selection.
89 /// <param name="e"></param>
90 protected override void OnSelectionChanged(global::System
.EventArgs e
)
92 base.OnSelectionChanged(e
);
94 if(global::Fabrikam
.Dsl
.TestValidation
.TestValidationHelpKeywordHelper
.Instance
!= null)
96 DslModeling::ModelElement selectedElement
= this.PrimarySelection
as DslModeling
::ModelElement
;
97 if(selectedElement
!= null)
99 string f1Keyword
= global::Fabrikam
.Dsl
.TestValidation
.TestValidationHelpKeywordHelper
.Instance
.GetHelpKeyword(selectedElement
);
100 if (!string.IsNullOrEmpty(f1Keyword
) && this.SelectionHelpService
!= null)
102 this.SelectionHelpService
.AddContextAttribute(string.Empty
, f1Keyword
, global::System
.ComponentModel
.Design
.HelpKeywordType
.F1Keyword
);